package io.renren.modules.work.Utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author: weihongyang
 * @Date: 2019/10/15 9:10
 * @Version 1.0
 */
public class ManagePublicMethod {
    /**
     *创建任务单号
     */
    public static String creatOrderCode(String orderType,String consonleCode){
        String orderCode = null;
        Date date = new Date();
        SimpleDateFormat sdf= new SimpleDateFormat("yyyyMMddHHmmssSSS");
        String bach= sdf.format(date);
        if(orderType.equals(ManageConstant.IN_STOCK_ORDER_TYPE)) {
            orderCode=orderType+consonleCode+bach;
        }
        if(orderType.equals(ManageConstant.OUT_STOCK_ORDER_TYPE)) {
            orderCode=orderType+consonleCode+bach;
        }
        return orderCode;
    }
}
